<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

   <title>DREAM Toolbox - stratranddraw</title>

   <meta name="keywords" content="stratranddraw">

   <meta name="description" content="stratranddraw">

   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  
   <meta name="robots" content="index, follow">

   <meta author="Jurriaan H. Spaaks">

   <link type="text/css" rel="stylesheet" href="styles/dream_styles.css">
 
</head>



<body>
<a name="_top"></a>

<div class="linkheader">
<a href="matlab:edit(fullfile(dreamroot,'stratranddraw'))">View source code of the function <span style="font-family:monospace">stratranddraw()</span> in the MATLAB editor</a><br><br>
<a href="matlab:web(fullfile(dreamroot,'html','contents.html'),'-helpbrowser')">Toolbox contents</a>
</div>

<div class="spacer">
</div>


<div class="h1">
stratranddraw
</div>

<div class="h2">
Syntax
</div>

<div class="txt">
<pre>sRandDraw = stratranddraw(dreamPar)</pre>
</div>

<div class="h2">
Description
</div>

<div class="txt">
<p>
Stratified random sampling of points from the valid parameter space as defined by <span style="font-family:monospace">dreamPar.parRangeMin</span> and <span style="font-family:monospace">dreamPar.parRangeMax</span>.  
</p>
<p>
<span style="font-family:monospace">stratranddraw</span> divides each axis <span style="font-family:monospace">(1..dreamPar.nOptPars)</span> into  <span style="font-family:monospace">X</span> segments, such that <span style="font-family:monospace">X</span> is the largest positive integer for which <span style="font-family:monospace">X^dreamPar.nOptPars < dreamPar.nSamples</span>. This way the parameter space is divided into <span style="font-family:monospace">nStratRandSamples</span> hyperrectangles. From each hyperrectangle, exactly one random sample is taken. When the number of required samples <span style="font-family:monospace">dreamPar.nSamples</span> is larger than <span style="font-family:monospace">nStratRandSamples</span>, an additional <span style="font-family:monospace">nSamples-nStratRandSamples</span> samples are taken using uniform random sampling of the parameter space (see <a href="unifranddraw.html">unifranddraw</a>).
</p>
</div>


<div class="footer">
</div>


<div class="spacer">
</div>


<a name="_bottom"></a>


</body>

</html>